package com.idheima.Set.anli;

import java.util.HashSet;

public class Test {
    public static void main(String[] args) {
        HashSet<Student> hs = new HashSet<>();
        Student s1 = new Student("张三", 18);
        Student s2 = new Student("张三", 18);
        System.out.println(s1.hashCode());
        System.out.println(s2.hashCode());
        System.out.println(s1.equals(s2));
        hs.add(s1);
        hs.add(s2);
        System.out.println(hs);
    }
}
